package com.AAA.service.Impl.scl;

import com.AAA.entity.mht.TMhtRecordDedtail;
import com.AAA.entity.scl.TSclRecordDedtail;
import com.AAA.service.scl.TSclRecordDedtailService;
import com.AAA.dao.scl.TSclRecordDedtailMapper;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (TSclRecordDedtail)表服务实现类
 *
 * @author makejava
 * @since 2022-10-31 19:46:04
 */
@Service
public class TSclRecordDedtailServiceImpl implements TSclRecordDedtailService {
   @Autowired
   private TSclRecordDedtailMapper tSclRecordDedtailDao;

   @Override
   public boolean insertBatch(List<TSclRecordDedtail> details) {
      int i=0;
      for (TSclRecordDedtail detail : details) {
         i+=tSclRecordDedtailDao.insert(detail);
      }
      return details.size()==i;
   }

    public boolean selectByTid(Integer tid) {
       TSclRecordDedtail tSclRecordDedtail = new TSclRecordDedtail();
       tSclRecordDedtail.setSclno(tid);
       List<TSclRecordDedtail> select = tSclRecordDedtailDao.select(tSclRecordDedtail);
       if (select.size()>0){
          return true;
       }
       return false;
    }

}
